package com.ok.activity.controller;


import com.ok.activity.domain.po.OkUseractivity;
import com.ok.activity.service.IOkUseractivityService;
import com.ok.common.domain.po.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 用户活动关系表 前端控制器
 * </p>
 *
 * @author lhw
 * @since 2024-04-29
 */
@Api(tags = "用户活动相关接口")
@RestController
@RequestMapping("/useractivity")
@RequiredArgsConstructor
public class OkUseractivityController {

    private final IOkUseractivityService okUseractivityService;

    @ApiOperation("*参加活动")
    @PostMapping("/join")
    public Result join(@RequestParam Integer activityId){
        String voucher = okUseractivityService.join(activityId);
        return Result.success(voucher);
    }
}
